//
//  FCRelationTypeManagerCell.m
//  AFNetworking
//
//  Created by 陈文斌 on 2019/6/21.
//

#import "FCRelationTypeManagerCell.h"
#import "CustomerRelationHeader.h"

@implementation FCRelationTypeManagerCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self=[super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        WJCWeakSelf
        _avatarImageView = [[UIImageView alloc] init];
        [self addSubview:_avatarImageView];
        [_avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_offset(32);
            make.centerY.mas_equalTo(0);
            make.width.and.height.mas_equalTo(36);
        }];
        FCSETLRViewBorderRadius(_avatarImageView, 18);
        
        _employeeNameLabel = [[UILabel alloc] init];
        [self addSubview:_employeeNameLabel];
        _employeeNameLabel.font = font15;
        _employeeNameLabel.textColor = FCTxtColor;
        _employeeNameLabel.numberOfLines = 1;
        [_employeeNameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(weakSelf.avatarImageView.mas_right).mas_offset(10);
            make.top.equalTo(weakSelf.avatarImageView.mas_top).mas_offset(-3);
            make.right.mas_equalTo(16);
            make.height.mas_equalTo(21);
        }];
        _employeeDetailLabel = [[UILabel alloc] init];
        [self addSubview:_employeeDetailLabel];
        _employeeDetailLabel.font = font12;
        _employeeDetailLabel.textColor = FCGrayTxtPlaceColor;
        _employeeDetailLabel.numberOfLines = 1;
        [_employeeDetailLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(weakSelf.avatarImageView.mas_right).mas_offset(10);
            make.bottom.equalTo(weakSelf.avatarImageView.mas_bottom).mas_offset(3);
            make.right.mas_equalTo(16);
            make.height.mas_equalTo(17);
        }];
        UIView *lineView = [UIView new];
        [self addSubview:lineView];
        [lineView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(weakSelf.avatarImageView.mas_left).mas_equalTo(0);
            make.bottom.and.right.mas_equalTo(0);
            make.height.mas_equalTo(0.5);
        }];
        lineView.backgroundColor = FCLineColor;
    }
    return self;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
